import cookie from "./cookie"
// 判断登录
const isLogin = () => !!cookie.getCookie('token');
// 取token
const getToken = () => cookie.getCookie('token');
const getRole = () => cookie.getCookie('role');
// 移除用户登录缓存
const removeUserInfo = () => {
  cookie.removeCookie('userInfo');
  cookie.removeCookie('role');
  cookie.removeCookie('token');
}

export {
  isLogin,
  getToken,
  removeUserInfo,
  getRole
}